Add config-gated Pro Plan routing profile#3193
Conversation
# Conflicts: # crates/tui/src/tui/ui.rs
# Conflicts: # crates/tui/src/commands/config.rs # crates/tui/src/core/engine/tests.rs # crates/tui/src/localization.rs # crates/tui/src/tui/app.rs # crates/tui/src/tui/ui.rs # docs/MODES.md
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Thanks @dumbjack for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
There was a problem hiding this comment.
Code Review
This pull request introduces the "Pro Plan" profile (AppMode::ProPlan), a config-gated routing profile that allows users to plan with a Pro model, execute with a Flash model, and review with a Pro model. It includes state flow transitions (ProPlanRouter), localization updates, UI integrations, and fail-closed safety rules. The review feedback highlights a case-sensitivity issue when matching English terms mixed into Chinese phrases and suggests removing a redundant .into_iter() call on an iterator.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "开 pr", | ||
| ] | ||
| .iter() | ||
| .any(|needle| trimmed.contains(needle)); |
There was a problem hiding this comment.
Using trimmed.contains(needle) here makes the check case-sensitive for English terms mixed into Chinese phrases (such as "PR" vs "pr"). Since lower is already computed, using lower.contains(needle) instead will ensure case-insensitive matching for terms like "提PR".
| .any(|needle| trimmed.contains(needle)); | |
| .any(|needle| lower.contains(needle)); |
| let words = lower | ||
| .split(|ch: char| !ch.is_ascii_alphanumeric()) | ||
| .filter(|word| !word.is_empty()); | ||
| let asks_for_action_word = words.into_iter().any(|word| { |
|
oh interesting are you thinking of this kind of like the claude code ultraplan? i'm hoping to harden / strenghten planning overall so this is helpful for me to get an implementation. if you're able to clarify your intent with this a bit more it would help me out a ton! |
|
ah I see now - so planning with stronger model and implementing with weaker. i've seen the reverse as well especially in codex. I think separating the planning model and the executing model is probably the happy medium and figuring out how to configure that. i'll work on getting this in! thank you so much for this greaet idea |
Summary
Fresh follow-up to the closed Pro Plan exploration in #1865. This reworks the feature as an explicit, config-gated routing profile with no default mode/menu change.
pro_plan_profile = falseas the default settings gate/mode pro-planuntil the profile is enabled with/config pro_plan_profile true --saveTabcycle and/modepicker limited to Agent / Plan / YOLO<pro_plan ...>markersAppMode::ProPlanbehavior in engine registry, sandbox, runtime prompt, and approval policyValidation
cargo fmt --all -- --checkcargo check -p codewhale-tuicargo test -p codewhale-tui pro_plan --quietcargo test -p codewhale-tui plan_prompt --quietcargo test -p codewhale-tui localization --quietcargo test -p codewhale-tui config_view_exposes_all_available_saved_settings --quietcargo test -p codewhale-tui --quietFull
codewhale-tuipass: 4502 passed, 0 failed, 4 ignored for the main bin target, plus integration/feature targets passed.Notes
This intentionally does not add Pro Plan to
default_mode, the mode picker, or the visible cycle. The profile remains available only after an explicit saved setting so the main model/menu surface stays neutral.